home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 426 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.4 KB

  1. From: David Byrden <100101.2547@compuserve.com>
  2. Message-ID: <4gd89p$hum@news.bridge.net>
  3. X-Original-Date: 20 Feb 1996 19:43:53 GMT
  4. Path: in2.uu.net!bounce-back
  5. Date: 21 Feb 96 07:04:49 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: Re: vector<T,Allocator> insert functions
  9. Organization: self-employed
  10. References: <4g892r$1ave@usenetp1.news.prodigy.com>
  11. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMSrEHuEDnX0m9pzZAQFtLAF/e3DgeR7FFSiyqh0xIAdi5sA3pe8lmnau
  14.     Zmo9kLPXSBxAneSBZG+9djbpQTcsZXjV
  15.     =mKMR
  16.  
  17. Karen;
  18.  
  19. >> As a minimum, I guess that begin() <= position <= end().  Are 
  20. >> insertion points allowed outside of these values? 
  21.  
  22.   No. To insert outside of these limits would create a vector with some 
  23. 'empty' places, i.e. uninitialised RAM. Without looking it up, I am pretty 
  24. sure that the intention of the template vector is that it hold a 
  25. contigous block of valid objects. Remember, when elements are shuffled 
  26. around, operator= is used on them without any check to see that they are 
  27. valid.
  28.  
  29.                          David
  30. ---
  31. [ To submit articles: try just posting with your news-reader.
  32.                       If that fails, use mailto:std-c++@ncar.ucar.edu
  33.   FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  34.   Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  35.   Comments? mailto:std-c++-request@ncar.ucar.edu.
  36. ]
  37.